GET /api/admin/learn/courses
List of Courses

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

[
  {
    "id": 2,
    "title": "Social Media for Athletic Departments"
  },
  ...
]

GET /api/admin/learn/courses/:id
Course Info

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "id": 2,
  "title": "Social Media for Athletic Departments",
  "sections": [
    {
        "id": 2,
        "title": "Introduction"
    },
    ...
  ],
  "exam": {
    "id": 1,
    "title": "Exam"
  }
}

Params

Param name Description
id
required

Validations:

  • Must be a Integer


POST /api/admin/learn/courses
Create Course

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  course: {
    title: "Social Media for Athletic Departments"
  }
}

Success response body

{
  "id": 2,
  "title": "Social Media for Athletic Departments"
}

Params

Param name Description
course
required

Validations:

  • Must be a Hash

course[title]
required

Validations:

  • Must be a String


PUT /api/admin/learn/courses/:id
Update Course

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  course: {
    title: "Social Media for Departments"
  }
}

Success response body

{
  "id": 2,
  "title": "Social Media for Departments"
}

Params

Param name Description
id
required

Validations:

  • Must be a Integer

course
required

Validations:

  • Must be a Hash

course[title]
required

Validations:

  • Must be a String


DELETE /api/admin/learn/courses/:id
Destroy Course

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "success": true
}

Params

Param name Description
id
required

Validations:

  • Must be a Integer